#define _CRT_SECURE_NO_WARNINGS 1

class Solution {
public:
    bool isUnique(string astr) {
        char* count = new char[26] {0};
        for (int i = 0; i < astr.size(); ++i)
        {
            count[astr[i] - 'a']++;
        }
        for (int i = 0; i < 26; ++i)
        {
            if (0 != count[i] && 1 != count[i])
            {
                return false;
            }
        }
        return true;
    }
};